package sample;

import static org.hamcrest.CoreMatchers.*;
import static org.junit.Assert.*;

import org.junit.Test;

import mockit.Expectations;
import mockit.Mocked;

public class FooTest_3 {

  @Test
  public void testGetString(@Mocked final Foo foo1, @Mocked final Foo foo2) {
    // Record
    new Expectations() {
      {
        foo1.getString();
        result = "Mock1";
        foo2.getString();
        result = "Mock2";
      }
    };

    // Replay
    String actual1 = foo1.getString();
    String actual2 = foo2.getString();

    // Verify
    assertThat(actual1, is("Mock1"));
    assertThat(actual2, is("Mock2"));
  }

}